import request from '@/request/request.js'; 

/**
 * @description  获取首页题库列表
 */ 
export function getQuestionList(){
	return request({
		url: '/api/question/getQuestionList',
		headers: {
			isToken: false,
		},
		method: 'get'
	})
}

/**
 * @description  获取关联题库列表
 */ 
export function getQuestionRelList(){
	return request({
		url: '/api/question/getQuestionList',
		headers: {
			isToken: false,
		},
		method: 'get'
	})
}

/**
 * @description  获取题目列表
 */ 
export function getExamList(param){
	return request({
		url: '/api/question/getExamList',
		headers: {
			isToken: true,
		},
		method: 'get',
		data: {
			category_id: param.uid
		}
	})
}

/**
 * 提交试卷答题
 * @param {Object} params
 */
export function submitExam(param) {
	return request({
		url: '/api/answerResults/submit',
		headers: {
			isToken: true,
		},
		method: 'post',
		data: param
	})
}

/**
 * @description  获取提交结果
 */ 
export function getSubmitInfo(param){
	return request({
		url: '/api/answerResults/examSet',
		headers: {
			isToken: true,
		},
		method: 'get',
		data: {
			examSetId: param.uid
		}
	})
}

/**
 * @description  获取提交结果
 */ 
export function getSubmitHisotyList(param){
	return request({
		url: '/api/answerResults/history',
		headers: {
			isToken: true,
		},
		method: 'get',
		data: param
	})
}

/**
 * @description  获取提交结果
 */ 
export function getUserExamWrong(param){
	return request({
		url: '/api/answerResults/Wrong',
		headers: {
			isToken: true,
		},
		method: 'get',
		data: param
	})
}



